﻿#region | Copyright © 2556 |

/*
##########################################################################
	Author By : Siriwat Suananpornpanit
	DateTime : 2556/08/30
##########################################################################
*/

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;

namespace Web.Core
{
    public partial class Exception
    {
        public static string ModalException(
            //Type T,
            //String method,
            MethodBase method ,
            System.Exception ex = null)
        {
            string line = "<br />";
            string msg = string.Format(@"
                                         {0}
                                        Class => {1}.{2}
                                         {0}{0}
                                        Method => {3}
                                         {0}{0}
                                        Message => {4}
                                         {0}
                                        ", line,method.ReflectedType.Namespace, method.ReflectedType.Name, method.Name, ex.Message);
            return msg;
        }
    }
}